package com.ruoyi.mall.app.controller;


import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.mall.app.service.DtsFootprintService;
import com.ruoyi.mall.common.domain.DtsCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/user/footprint")
public class DtsFootprintController extends BaseController {
    @Autowired
    private DtsFootprintService dtsFootprintService;


    @Log(title = "添加用户浏览足迹", businessType = BusinessType.INSERT)
    @GetMapping("/footprintInsert")
    public AjaxResult add(Long userId,Long goodsId)
    {
        if (userId != null && userId > 0) {
            return success(dtsFootprintService.insertFootprint(userId,goodsId));
        }
        return success(0);
    }
}
